package Server.DataBase;
/**
 * 
 * @author Baglama team
 *
 */
import java.io.Serializable;
import java.util.ArrayList;
/**
 *   initializes course class
 */
public class Course implements Serializable{
	/**
	 //private static final long serialVersionUID = 1L;
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * course id number
	 */
	private int idCourse;
	
	/**
	 * course name
	 */
	private String courseName;
	
	/**
	 * teaching unit
	 */
	private int tunit;
	
	/**
	 * course total time
	 */
	private int hours;
	
	/**
	 * Precourses of the course
	 */
	private ArrayList<Course> preCourse;
	
	/**
	 * builder init set
	 */
	public Course(){
		preCourse = new ArrayList<Course>();
	}
	
	/**
	 * @return course id
	 */
	public int getIdCourse() {
		return idCourse;
	}
	
	/**
	 * set course id
	 * @param idCourse
	 */
	public void setIdCourse(int idCourse) {
		this.idCourse = idCourse;
	}
	
	/**
	 * @return course name
	 */
	public String getCourseName() {
		return courseName;
	}
	
	/**
	 * set course name
	 * @param courseName
	 */
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	
	/**
	 * @return teaching unit
	 */
	public int getTunit() {
		return tunit;
	}
	
	/**
	 * set teaching unit
	 * @param tunit
	 */
	public void setTunit(int tunit) {
		this.tunit = tunit;
	}
	
	/**
	 * @return hours
	 */
	public int getHours() {
		return hours;
	}
	
	/**
	 * set hours
	 * @param hours
	 */
	public void setHours(int hours) {
		this.hours = hours;
	}
	
	/**
	 * @return precourses
	 */
	public ArrayList<Course> getPreCourse() {
		return preCourse;
	}
	
	/**
	 * add course to set
	 * @param course
	 */
	public void addPreCourse(Course course) {
		preCourse.add(course);
	}
	
	public String toString(){
		return courseName;
	}
}
